package Builder.builder;

import Builder.interfaceImpl.component.Meal;
import Builder.interfaceImpl.food.ChickenBurger;
import Builder.interfaceImpl.food.Coffee;
import Builder.interfaceImpl.food.Milk;
import Builder.interfaceImpl.food.VegBurger;

/**
 * @version : 1.0
 * @author: pengzx
 * @Description: 套餐的创建者，实际的Builder类创建Meal对象
 * @date: 15:16 2017/11/16
 */
public class MealBuilder {
    /**
     * 创建一个蔬菜汉堡何咖啡组成的套餐
     * @return
     */
    public Meal prepareVegMeal(){
        Meal meal = new Meal();
        meal.addItem(new VegBurger());
        meal.addItem(new Coffee());
        return meal;
    }

    public Meal preparenonMeal(){
        Meal meal = new Meal();
        meal.addItem(new ChickenBurger());
        meal.addItem(new Milk());
        return meal;
    }
}
